@extends('layouts.default')

@section('title')
    {{{ $user->name }}} {{ lang('Charge Point') }}_@parent
@stop

@section('content')

    <div class="users-show row">

        <div class="col-md-3">
            @include('users.partials.basicinfo')
        </div>

        <div class="main-col col-md-9 left-col">

            <ol class="breadcrumb">
                <li><a href="{{ route('users.show', $user->id) }}">个人中心</a></li>
                <li class="active">D币转积分（剩余D币: {{$dcoin_statistic['remain_dcoins']}}）</li>
            </ol>
            <div class="alert alert-warning">
                D币转换积分说明：<br>
                根据用户需要，D币可以单向转换为积分，但不可逆转，1D币=10积分
            </div>
            <div class="panel panel-default text-center">
                <div class="panel-body">
                    <form method="POST" action="{{ route('users.dcoin_2_point', $user->id) }}" accept-charset="UTF-8" id="topic-create-form" class="topic-form">
                        {!! csrf_field() !!}

                        <div class="form-group col-md-3">
                            <input class="form-control " id="dcoin_transfer" placeholder="{{$dcoin_statistic['remain_dcoins'] > 0 ? '请填写D币数量' : '您的D币不足'}}" name="dcoin_transfer" type="number" value="" min="1" max="{{$dcoin_statistic['remain_dcoins']}}" required="required">

                        </div>
                        <div class="form-group status-post-submit col-md-1">
                            <button class="btn btn-primary submit-btn" id="topic-submit" type="submit">{{ lang('Transfer') }}</button>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>

@stop
